import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: HomeView,
    redirect: "/home"
  },
  {
    path: "/home",
    component: () => import(/* webpackChunkName: 'home' */ "@/views/Home.vue")
  },
  {
    path: "/user",
    component: () => import(/* webpackChunkName: 'user' */ "@/views/User.vue")
  },
  {
    path: "/concern",
    component: () => import(/* webpackChunkName: 'concern' */ "@/views/Concern.vue")
  },
  {
    path: "/cloud",
    component: () => import(/* webpackChunkName: 'cloud' */ "@/views/Cloud.vue")
  },
  {
    path: "/album",
    component: () => import(/* webpackChunkName: 'album' */ "@/views/Album.vue")
  },
  {
    path: "/song",
    component: () => import(/* webpackChunkName: 'song' */ "@/views/Song.vue")
  },
  {
    path: "/search",
    component: () => import(/* webpackChunkName: 'search' */ "@/views/Search.vue")
  },
  {
    path: "/login",
    component: () => import(/* webpackChunkName: 'login' */ "@/views/Login.vue")
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
